package cn.starrysky.hrm.client;

import cn.starrysky.hrm.docment.CourseDoc;
import cn.starrysky.hrm.query.CourseDocQuery;
import cn.starrysky.hrm.util.AjaxResult;
import cn.starrysky.hrm.util.PageList;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "SEARCH-SERVICE",fallbackFactory = CourseSearchFallbackFactory.class)
@RequestMapping("/courseSearch")
public interface CourseSearchClient {

    @PostMapping("/addOrUpdate")
    AjaxResult addOrUpdate(@RequestBody CourseDoc courseDoc);
    @DeleteMapping("/delete/{id}")
    AjaxResult delete(@PathVariable("id") Long id);

    @PostMapping("/queryCourses")
    PageList<CourseDoc> queryCourses(@RequestBody CourseDocQuery docQuery);


}
